package com.fly.studio.home.app.concurrency;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fuliying3
 * @date 2022/09/22 14:27:00
 */
public class ServerHelper {

    public List<Server> getServerList() {
        List<Server> serverList = new ArrayList<>();
        Server parWorker1 = new Server();
        parWorker1.setName("parWorker1");
        List<String> parWorker1Depends = new ArrayList<>();
        parWorker1.setDepends(parWorker1Depends);

        Server parWorker2 = new Server();
        parWorker2.setName("parWorker2");
        List<String> parWorker2Depends = new ArrayList<>();
        parWorker2Depends.add("parWorker1");
        parWorker2.setDepends(parWorker2Depends);

        Server parWorker3 = new Server();
        parWorker3.setName("parWorker3");
        List<String> parWorker3Depends = new ArrayList<>();
        parWorker3.setDepends(parWorker3Depends);

        Server parWorker4 = new Server();
        parWorker4.setName("parWorker4");
        List<String> parWorker4Depends = new ArrayList<>();
        parWorker4Depends.add("parWorker2");
        parWorker4Depends.add("parWorker3");
        parWorker4.setDepends(parWorker4Depends);

        Server parWorker5 = new Server();
        parWorker5.setName("parWorker5");
        List<String> parWorker5Depends = new ArrayList<>();
        parWorker5Depends.add("parWorker2");
        parWorker5Depends.add("parWorker3");
        parWorker5.setDepends(parWorker5Depends);

        serverList.add(parWorker4);
        serverList.add(parWorker1);
        serverList.add(parWorker2);
        serverList.add(parWorker5);
        serverList.add(parWorker3);
        return serverList;
    }
}
